package com.zhouyu;


import org.springframework.asm.ClassReader;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;

/**
 * @author leimingchao
 * create 2025-04-06 18:29
 */
public class Test2 {

	public static void main(String[] args) {

		try {
			//ASM技术，不涉及类的加载
			InputStream inputStream = new FileInputStream("D:\\develop\\IdeaProjects\\zhouyu-spring\\target\\classes\\com\\zhouyu\\service\\AppConfig.class");
			//ClassReader:遵循JVM规范，或者字节码的规范解析字节码
			ClassReader classReader = new ClassReader(inputStream);

			System.out.println(classReader.getClassName());
			System.out.println(classReader.getSuperName());
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
